package com.stream.pushstream;

import com.stream.pushstream.stream.FfmpegServer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

@SpringBootApplication
public class PushstreamApplication implements CommandLineRunner {
    @Autowired
    private FfmpegServer ffmpegServer;
    private Logger logger = LoggerFactory.getLogger(PushstreamApplication.class);
    public static void main(String[] args) {
//        SpringApplication.run(PushstreamApplication.class, args);
            ApplicationContext applicationContext = SpringApplication.run(PushstreamApplication.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
        ffmpegServer.run();
        logger.error("项目启动成功");
    }
}
